load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")

oncall("secure_pipes")

cpp_library(
    name = "encrypted_client_hello",
    headers = [
        "ECHExtensions.h",
        "ECHExtensions-inl.h",
        "Types.h",
        "Types-inl.h",
    ],
    exported_deps = [
        "//fizz/crypto/hpke:types",
        "//fizz/record:record",
        "//folly/io:iobuf",
    ],
)

cpp_library(
    name = "encryption",
    srcs = [
        "Encryption.cpp",
    ],
    headers = [
        "Encryption.h",
    ],
    deps = [
        "//fizz/crypto/hpke:utils",
        "//fizz/protocol:protocol",
        "//fizz/record:record",
    ],
    exported_deps = [
        ":encrypted_client_hello",
        "//fizz/crypto/exchange:key_exchange",
        "//fizz/crypto/hpke:hpke",
        "//fizz/protocol:factory",
    ],
)

cpp_library(
    name = "decrypter",
    srcs = [
        "Decrypter.cpp",
    ],
    headers = [
        "Decrypter.h",
    ],
    exported_deps = [
        ":encrypted_client_hello",
        ":encryption",
    ],
)
